{include file="common/head"}
<head>
<title>货车新增</title>

<style type="text/css">
  #top{background: #f60;opacity: 1;}
  #content{background-color:#fff;border-radius: 10px;padding: 10px;border: 1px solid #555;}
</style>        
</head>
<body style="background: #f60;">
    <div class="container-fluid" style="max-width: 600px;"  >

    <div id="top" class="row" class="text-center" style="color:white;">
        <div class="col-2 text-center" style="padding: 0;">
            <span class="bi-chevron-left btn-back"></span>
        </div>
        <div class="col-8 text-center">Truck register</div>
        <div class="col-2 text-center" style="padding: 0;">
            <!-- <span class="bi-arrow-clockwise"></span> -->
        </div>
    </div>
    <div style="height:60px;"></div>

    <div id="content">
    <form method="post" enctype="multipart/form-data" action="/index.php/truck/truck_add">      
      <div class="mb-3">
        <label for="brand" class="form-label">品牌(Brand):</label>
        <input type="text" class="form-control" id="brand" name="brand" value="" placeholder="" />
      </div>       
      <div class="mb-3 mt-3">
        <lable for="cat" class="form-label">所属分类(Categray):</label>
        <select id="cat" name="cat" class="form-control">
            {foreach $category as $k=>$v}
              {if $v['deepth']==1}
              <option value="{$k}" >&nbsp;&nbsp;{$v['name']}</option>
              {elseif $v['deepth']==2}
              <option value="{$k}" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{$v['name']}</option>
              {elseif $v['deepth']==3}
              <option value="{$k}" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{$v['name']}</option>
              {else}
              <option value="{$k}" >{$v['name']}</option>              
              {/if}
            {/foreach} 

        </select>
      </div>
      <div class="mb-3 mt-3">
        <lable for="name" class="form-label">名称(Chinese Name):</label>
        <input type="text" class="form-control" id="name" name="name" value="" placeholder="" />
      </div>
      <div class="mb-3 mt-3">
        <lable for="name2" class="form-label">Khmer Name:</label>
        <input type="text" class="form-control" id="name2" name="name2" value="" placeholder="" />
      </div>      
      <div class="mb-3">
        <label for="name3" class="form-label">English Name:</label>
        <input type="text" class="form-control" id="name3" name="name3" value="" placeholder="" />
      </div>

      
      <div class="mb-3">
        <img src="" style="width:60px;"/>
        <label for="status" class="form-label">图片(Image):</label>
        <input type="file"  name="file" /> <br> 
       </div>
      
      <button  type="type" class="form-control btn btn-primary" onClick="doSave()">保存(Save)</button>
    </form>
    </div>
    </div>

<script type="text/javascript">
  function do_save(){
    $("form").submit();
  }
$(document).ready(function(){
    $(".btn-back").on('click',function(){
        window.history.back();
    })


})

</script>


</body>
</html>
